package generadorDeDatos;

import java.util.ArrayList;
import java.util.List;

import cern.jet.random.Poisson;
import cern.jet.random.engine.DRand;
import cern.jet.random.engine.RandomEngine;

public class poisson {

	public static void main(String[] args) {


		RandomEngine engine = new DRand();
		Poisson poisson = new Poisson(0.3, engine); // lambda 0.3
		double a = 0;
		int j = 0;
		List<Integer>numeros = new ArrayList<Integer>();
		for (int i = 0; i < 140; i++)
			numeros.add(10*i);
		List<Integer>numerosPoisson = new ArrayList<Integer>();
		
		for (int i = 0; i < 1400; i++) 
			numerosPoisson.add(Math.abs(poisson.nextInt()));
		j=1;
		for (int i = 0; i < 1400; i++) {
			if(j!=140){
				a=a+numerosPoisson.get(i);
				if(i==numeros.get(j)){
					System.out.println("\n suma= "+a+"\n\n cantidad= "+10+"\n\n promedio= "+a/10+
							"\n\n j= "+j+"\n\n i= "+i+"\n"+"######################");
					j++;
					a=0;
				}
			}
		}
		for (int i = 0; i < 1400; i++) 
			System.out.println(numerosPoisson.get(i));
	}
}

